<div id="tabs">

<form class="form-horizontal" role="form" id="ae_form" action="/pg/ac_main_PaginaStatica/Create" method="post">
<input type="hidden" name="id" value="{{pageData['dao'].id}}"/>
<ul>
    <li><a href="#tabs-1" title="Informazioni principali ed obbligatorie">Dati principali</a></li>
</ul>

<div id="tabs-1">
    <div class="form-group" title="">
        <label class="col-sm-2 col-lg-2 control-label" for="title">Titolo:</label>
        <div class="col-sm-7 col-lg-7">
            <input class="form-control" type="text" id="title" name="title" size="10" value='{{pageData["dao"].title|nonone}}' />
        </div>
    </div>
    <div class="form-group" title="">
        <label class="col-sm-2 col-lg-2 control-label" for="body">Corpo</label>
        <div class="col-sm-7 col-lg-7">
            <textarea class="form-control" type="text" id="body "name="body" rows=20" cols="85">{{pageData['dao'].body|nonone}}</textarea>
        </div>
    </div>
</div>
     <div class="form-group">
        <label class="col-sm-2 col-lg-2 control-label" for="id_categoria" >Categoria Pagina</label>
        <div class="col-sm-5 col-lg-5">
            <select id="id_categoria" name="id_categoria" class="validate[required]">
                <option value=""></option>
                    {% for t in pageData['categ'] %}
                <option value="{{t.id}}" {{ 'selected="selected"' if t.id == pageData["dao"].id_categoria}}  >{{t.denominazione}} </option>
                    {% endfor %}
            </select>
        </div>
    </div>


<div class="form-group" title="Bottoni di salvataggio e reset del form">
        <div class="col-sm-5 col-lg-5 col-sm-offset-2">
            <input class="btn btn-default" type="submit" value="Salva" name="add"/>
            <input class="btn btn-default" type="button" value="Chiudi" name="chiudi" id="chiudi_edit"/>
        </div>
    </div>

</form>
</div>


<script type="text/javascript" src="/tpl/pg/js/plugins/tinymce/tiny_mce.js"></script>
<script type="text/javascript" src="/tpl/pg/js/plugins/tinymce/jquery.tinymce.js"></script>
<script type="text/javascript">

$(document).ready(function(){

$("#ae_form").validationEngine();
 $(function() {
$( "#tabs" ).tabs();
});




$('textarea').tinymce({
    theme : "advanced",
    plugins :"safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,media,searchreplace,contextmenu,paste,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
    // Theme options
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
    theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,|,forecolor,backcolor",
     theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr",
     //theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_statusbar_location : "bottom",
    theme_advanced_resizing : true,
    convert_urls : false,

        // Replace values for the template plugin
        template_replace_values : {
                username : "Some User",
                staffid : "991234"
        }
    });

});
</script>
